package com.xbongbong.workflow.model;


import com.xbongbong.workflow.domain.entity.WorkflowTaskNodeEntity;
import com.xbongbong.workflow.domain.entity.ext.WorkflowTaskNodeEntityExt;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 */
public interface WorkflowTaskNodeModel {
   Long insert(WorkflowTaskNodeEntity entity);

   void insertBatch(List<WorkflowTaskNodeEntity> list);

   List<WorkflowTaskNodeEntity> findEntities(Map<String, Object> param);

   Integer getEntityCount(Map<String, Object> param);

   void update(WorkflowTaskNodeEntity entity);

   WorkflowTaskNodeEntity getByKey(Long key, String corpid);
   
   void updateBatch(List<WorkflowTaskNodeEntity> list, String corpid);
   
   /**
    * 特殊关联查询
    * @param map
    * @return
    */
   List<WorkflowTaskNodeEntityExt> getJoinNodeForList(Map<String, Object> map);
   
   List<WorkflowTaskNodeEntityExt> findExtEntities(Map<String, Object> param);
   
   List<WorkflowTaskNodeEntityExt> getLatestNodeForList(Map<String, Object> param);
   
   void readAllCcList(HashMap<String, Object> param);

    void deleteByTaskId(Long taskId, String corpid);

    void readNode(WorkflowTaskNodeEntity nodeEntity);

    void deleteByTaskIds(String corpid, List<Long> taskIds);

    WorkflowTaskNodeEntity getWorkflowStartNodeTask(String corpid, Long formId, Long taskId, Long workflowId);

    Integer getTaskCountLimit(Map<String, Object> param);
}
